package org.bigjava.novelplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName chapter_says
 */
@TableName(value ="chapter_says")
@Data
public class ChapterSays implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 定位段落
     当前本章说发布位置,<br />不大于chaptert_paragraph_count
     */
    private Integer paragraphLocation;

    /**
     * 章节id
     */
    private Long chapterId;

    /**
     * 发布者id
     */
    private Integer addressorId;

    /**
     * 回复的本章说id
     只有当前字段为-1才能被回复
     */
    private Integer conversationTargetId;

    /**
     * 评论,限制200字数
     */
    @Length(max = 200)
    private String content;

    /**
     * 发布时间，插入时自动获取当前时间，无需逻辑处理
     */
    private Date publishTime;

    /**
     * 点赞数
     */
    private Integer likeCount;

    /**
     * 点踩数
     */
    private Integer downholeCount;

    /**
     * 逻辑删除
     0未删除；1删除

     */
    private Integer deleteState;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}